import { createWebHistory, createRouter } from "vue-router";
import members from "../views/List/members.vue";
import exercises from "@/views/List/exercises.vue";
import index from "@/views/List/header.vue";
import topup from "@/views/List/topup.vue";
import cooperate from "@/views/List/cooperate.vue";
import main from "@/views/List/main.vue"
import login from "@/views/List/Login.vue"
import ListPage from "@/views/List/ListPage.vue";
import shouye from "@/views/List/shouye.vue"

const routes = [
    // { path: '/member', component: members },
    // { path: '/exercises', component: exercises },
    // { path: '/topup', component: topup },
    // { path: '/cooperate', component: cooperate },
    {
        path: '/', component: index, children: [
            { path: '/', component: main },
            { path: '/main', component: main },
            { path: '/cooperate', component: cooperate },
        ]
    },

    { path: '/login', component: login, name: 'Login' },
    // sadasd
    {
        path: '/guanli', component: ListPage, name: 'Layout',
        // redirect: '/home',
        children: [
            { path: '', component: shouye },
            { path: '/members', component: members, name: 'Members' },
            { path: '/exercises', component: exercises },
            { path: '/topup', component: topup },

        ]
    },

]


const router = createRouter({
    history: createWebHistory(),
    routes,

})


export default router    